import React from 'react';
import { Pagination } from 'antd';

interface PaginationComponentProps {
    currentPage: number;
    total: number;
    pageSize: number;
    onPageChange: (page: number) => void;
    showSizeChanger?: boolean
}

const PaginationComponent: React.FC<PaginationComponentProps> = ({
    currentPage,
    total,
    pageSize,
    onPageChange,
    showSizeChanger
}) => {
    const paginationStyle: React.CSSProperties = {
        display: 'flex',
        justifyContent: 'center',
        width: '100%',
        margin: '20px 0',
    };
    return (
        <div className="pagination-wrapper" style={paginationStyle}>
            <Pagination
                showQuickJumper
                current={currentPage}
                total={total}
                pageSize={pageSize}
                onChange={onPageChange}
                showSizeChanger={showSizeChanger}
            />
        </div >
    );
};

export default PaginationComponent;
